
package org.springblade.modules.app.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.app.entity.Advertise;
import org.springblade.modules.app.mapper.AdvertiseMapper;
import org.springblade.modules.app.service.IAdvertiseService;
import org.springframework.stereotype.Service;

/**
 * 轮播图 服务实现类
 *
 * @author kingk
 */
@Service
public class AdvertiseServiceImpl extends ServiceImpl<AdvertiseMapper, Advertise> implements IAdvertiseService {

	//	@Override
//	public IPage<AdvertiseVO> selectAdvertisePage(IPage<AdvertiseVO> page, AdvertiseVO advertise) {
//		return page.setRecords(baseMapper.selectAdvertisePage(page, advertise));
//	}

	@Override
	public IPage<Advertise> selectAdvertisePage(IPage<Advertise> page, Advertise advertise) {
		LambdaQueryWrapper<Advertise> queryWrapper = new LambdaQueryWrapper<Advertise>();
		IPage<Advertise> result = baseMapper.selectPage(page, queryWrapper);
		return result;
	}

//	@Override
//	public IPage<SysDept> page(Page<SysDept> page, SysDeptDto params) {
//		LambdaQueryWrapper<SysDept> queryWrapper = new LambdaQueryWrapper<SysDept>();
//
//		if (!StringUtils.isEmpty(params)) {
//			queryWrapper.and(wrapper -> wrapper.like(SysDept::getDeptName, params.getDeptName()));
//		}
//		if (!StringUtils.isEmpty(params)) {
//			//默认查询未删除的 1:正常 2:已删除
//			queryWrapper.and(wrapper -> wrapper.like(SysDept::getDeleteFlag, "1"));
//		}
//		////根据不同的排序条件进行排序
//		if (StringUtils.isEmpty(params.getSortField())) {
//			queryWrapper.orderByDesc(SysDept::getCreateTime);
//		} else {
//			queryWrapper.orderByDesc(SysDept::getCreateTime);
//		}
//		IPage<SysDept> result = baseMapper.selectPage(page, queryWrapper);
//		return result;
//	}


}
